package add_init

import (
	"github.com/streadway/amqp"
	"log"
)

var MQConn *amqp.Connection

func init() {
	var err error
	MQConn, err = amqp.Dial("amqp://guest:guest@192.168.56.101:5672")
	if err != nil {
		log.Fatal(err)
	}
}

// MQGetConn 连接rabbitmq
func MQGetConn() *amqp.Connection {
	return MQConn
}
